The solution is to override TWindow's draw method as is shown in Example 4. The keyword Override (placed immediately after the procedure to be overridden) tells the compiler that we will be supplying a new draw method to be used in place of the one inherited from TWindow. All other behavior will be the same as TWindow.
Example 4: A new window class declaration based on the superclass TWindow.
TNewWindow = object(TWindow)
procedure Draw;
Override;
end;
Winding up and winding down.
Well, that's about as big a byte of the object elephant as we can cover in this issue (translated: I ran out of time). Next time we are going to develop some important object classes that we will be using later on. In particular, we are going to develop a window class, a menu class, an event class and finally an application class (which incorporates all the other classes). As a result there will be plenty of source code to ponder and play with.
Abadee... Abadee... That's all for this one folks!